<?php $pageurl = yii::$app->urlManager->createUrl(["goodslist/lists"]).'&page=';?>

<div class="page">
	<span class="p-num">
		<a class="pbtn prevPage <?php if($list['page'] == 1):?>grey<?php endif;?>" href="<?php if($list['page'] > 1):?><?=$pageurl.($list['page']-1)?><?php endif;?>">&lt; 上一页</a>
		<?php for($num=1;$num<=$list['maxpage'];$num++) {
		?>
		<a href="<?=$pageurl.$num?>" <?php if($num == $list['page']):?> class="cur" <?php endif;?>><?php echo $num;?></a>
		<?php 
		}?>
		<a class="pbtn nextPage <?php if($list['page'] == $list['maxpage']):?>grey<?php endif;?>" href="<?php if($list['page'] < $list['maxpage']):?><?=$pageurl.($list['page']+1)?><?php endif;?>">下一页 &gt;</a>
	</span>
	<span class="p-text">
		<em>共<b><?php echo $list['maxpage'];?></b>页&nbsp;&nbsp;到第</em>
		<input name="pageNum" id="pageNum" maxlength="4" value="1" onkeyup="this.value=this.value.replace(/[^0-9]/g,'');" />
		<em>页</em>
		<a class="confirm-btn">确定</a>
	</span>
</div>